<extend name="Layout:layout_content" />
<block name="body_main">
    <ul class="xsui-breadcrumb">
        <li><a href="{:U('Advertising/advert_list')}"><i  class="fa fa-home fa-fw"></i>媒体广告管理</a></li>
        <li class="current">{$meta_title}</li>
    </ul>
    <div class="grid-parent xsui-page-header">
        <div class="grid-100 mobile-grid-100 grid-parent">
            <a href="{:U('content_edit','advert_id='.$advert_id)}" class="xsui-btn ui-state-default xsui-lnk-add-dialog"><i class="fa fa-plus"></i>新增</a>
            <a href="{:U('content_delete','id=varkey')}" class="xsui-btn ui-state-default xsui-lnk-remove"><i class="fa fa-remove"></i>批量删除</a>
            <a href="#" class="xsui-btn ui-state-default xsui-lnk-refresh"><i class="fa fa-refresh"></i>刷新</a>
        </div>
    </div>
    <div id="grid-container">
        {$content}
    </div>
</block>
<block name="body_after">    
    <script type="text/javascript">
        $(function () {
            
            
            

            // 动态更改排序 2015-10-24 SoChishun Added.
            $('td.sort input').blur(function () {
                var $input = $(this);
                var old_v = $input.data('value');
                if ($input.val() == old_v) {
                    return;
                }
                $.get($input.data('url').replace('varsort', $input.val()), function (data) {
                    if (data.status) {
                        location.reload();
                    } else {
                        $('<div>' + data.info + '</div>').dialog();
                    }
                })
            })
        })
    </script>
</block>